<?php
// Assign to clniConfig
$conf = Celini::configInstance();

// Config for "Số lượng bệnh nhân đến khám theo độ tuổi" 
$reportAge = array(
	'start' 	=> 0,		// Minimal age
	'end'		=> 80,		// Maximal age
	'interval'	=> 10		// The interval
);
$conf->set('reportAge', $reportAge);



// Config for report "Thời gian tiêu tốn tại khoa khám"
// outbound of waiting time. It's used to calculate 'waiting time average'
// If a patient has been waiting longer than $limitedTime, it is reduced to $limitedTime
$limitedTime = 60; // minutes	  
$reporPerformance = array(
	'start' 	=> 15,		// minimal waiting time
	'end'		=> 50,		// maximal waiting time
	'interval'	=> 5		// interval
);
$conf->set('limited_time', $limitedTime);
$conf->set('reporPerformance', $reporPerformance);



// Config for report "Danh sách bệnh nhân tiềm năng"
$reportPotential = array(
	'start' 	=> 0,		// start age
	'end'		=> 80		// end age
);
$conf->set('reportPotential', $reportPotential);

define('REPORTBVCT_MODULE_ROOT', realpath(dirname(__FILE__) . '/../'));

$translate = Zend_Registry::get('Zend_Translate');
$lang = $_SESSION['lang'];
try {
	
	$translate->addTranslation(realpath(dirname(__FILE__))."/languages/$lang", $lang,array('scan' => Zend_Translate::LOCALE_DIRECTORY,
			'disableNotices'=>true,
			'clear'=>false
		));
	
} catch (Exception $ex) {
	//if exception while loading selected lang folder
	//we load the default langugage folder.
	$translate->addTranslation(realpath(dirname(__FILE__))."/languages/".$config['lang']['default'], $config['lang']['default'],array('scan' => Zend_Translate::LOCALE_DIRECTORY,
			'disableNotices'=>true,
			'clear'=>false
		));	
}

?>
